package com.cy.module.controller;


import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class ModuleViewController {
    //处理完客户端请求之后,将响应封装到ModelaneView对象
    @RequestMapping("doModuleandView")
    public String doModuleandView(Model model){
        model.addAttribute("username", "jason");
        model.addAttribute("state",true);
        return "View";
    }
    @RequestMapping("doModuleandView02")
    public String doModuleandView(){
        ModelAndView mv=new ModelAndView();
        mv.addObject("username", "jason");
        mv.addObject("state",true);
        return "View";
    }
}
